import {
    createRouter,
    createWebHashHistory
} from 'vue-router'

const routes = [{
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/LoginView.vue')
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('../views/HomeView.vue'),
        children: [
            { path: "/scoreline", name: "scoreline", component: () => import('../views/ScoreLineView.vue') },
            { path: "/scoresegment", name: "scoresegment", component: () => import('../views/ScoreSegmentView.vue') },
            { path: "/academyline", name: "academyline", component: () => import('../views/AcademyLineView.vue') },
            { path: "/specialtyline", name: "specialtyline", component: () => import('../views/SpecialtyLineView.vue') },
            { path: "/academy", name: "academy", component: () => import('../views/AcademyView.vue') },
            { path: "/academy/add", name: "addacademy", component: () => import('../views/AddAcademyView.vue') },
            { path: "/specialty", name: "specialty", component: () => import('../views/SpecialtyView.vue') },
            { path: "/user", name: "user", component: () => import('../views/UserView.vue') },
            { path: "/role", name: "role", component: () => import('../views/RoleView.vue') },
            { path: "/manager", name: "manager", component: () => import('../views/ManagerView.vue') },
            { path: "/role/add", name: "addrole", component: () => import('../views/AddRoleView.vue') }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router